package cn.cdu.medical.entity;

import cn.cdu.basics.baseClass.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Column;
import java.math.BigDecimal;

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "prescription_detail")
@TableName("prescription_detail")
@ApiModel(value = "处方明细")
@EqualsAndHashCode(callSuper = true)
public class PrescriptionDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "处方ID")
    private String prescriptionId;

    @ApiModelProperty(value = "药品ID")
    private String medicineId;

    @ApiModelProperty(value = "药品名称")
    private String medicineName;

    @ApiModelProperty(value = "规格")
    private String specification;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "数量")
    private BigDecimal amount;

    @ApiModelProperty(value = "用法")
    private String usageMethod;

    @ApiModelProperty(value = "频次")
    private String frequency;

    @ApiModelProperty(value = "用药天数")
    private Integer days;

    @ApiModelProperty(value = "单次剂量")
    private BigDecimal singleDose;

    @ApiModelProperty(value = "总剂量")
    private BigDecimal totalDose;

    @ApiModelProperty(value = "备注")
    @Column(columnDefinition = "TEXT")
    private String notes;
} 